home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
gnu
/
ispell31p3bin.lha
/
ispell-3.1.18bin
/
interfaces
/
shell
/
lookup.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-09-21
|
996b
|
44 lines
/*rx
* Lookup.rexx --- program to lookup a regular expression using the
* ISpell server from CLI.
*
* Copyright © 1990, 1992 Loren J. Rittle
* Use as you will, just document your changes and keep my copyright
* notice intact. Feel free to mail enhancements to me.
*
* Loren J. Rittle
* rittle@comm.mot.com
* Sun Sep 27 11:30:46 1992
*/
options results
if left(address(), 4) ~== 'WSH_' then
address command
if words(arg(1)) = 0 then
do
say "Usage: lookup word1 word2 ..."
exit 5
end
if ~show(ports, 'IRexxSpell') then
do
'run <nil: >nil: ispell -r >nil: <nil:'
waitforport 'IRexxSpell'
end
do i = 1 to words(arg(1))
item = word(arg(1),i)
address 'IRexxSpell' lookup item
r = result
r1 = substr(r,1,1)
select
when r1 = '&' then
say "The pattern '"||item||"' matches:" translate(substr(r,3), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
otherwise say "For the pattern '"||item||"' I got" r
end
end
exit 0